package com.ztf.gui;

import java.awt.Graphics;
import java.awt.image.BufferedImage;

import javax.swing.JPanel;

public class ImagePanel extends JPanel {

	BufferedImage image;
	int x;
	int y;
	public ImagePanel(BufferedImage image) {
		this.image=image;
	}
	
	public void setImage(BufferedImage image) {
		this.image = image;
	}
	public BufferedImage getImage() {
		return image;
	}

	@Override
	public void paint(Graphics g) {
		g.drawImage(image, x, y, null);
	}

}
